package cn.zou.blog.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import cn.zou.blog.entry.Article;
import cn.zou.blog.service.ArticleService;
import cn.zou.core.page.Page;
/**
 * 学习模块控制成
 * @author zoujing
 *
 */
@Controller
@RequestMapping("/learn")
public class LearnController {
	@Autowired 
	private ArticleService articleService;
  /**
   * 页面跳转
   * @return
   */
  @RequestMapping("/learnUI.shtml")
  public String learnUI(Page<Article> page,HttpServletRequest request,ModelMap map){
	  //跳转到学习页面
	  page = articleService.findArticles(page,request,Article.INFO_TYPE_XXTD,"type");
	  map.addAttribute("page", page);
	  map.addAttribute("articletype", Article.INFO_TYPE_MAP);
	  return "learn";
  }
}
